package jv.redis.datatype.string;

import java.net.URI;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.redisson.Redisson;
import org.redisson.api.RBucket;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;


public class RedisString {
	RedissonClient redisson ;
	@Before
	public void connectRedis(){
		Config config = new Config();
		config.useSingleServer().setAddress("redis://192.168.1.113:6379");
		redisson = Redisson.create(config);
	}
	
	@After
	public void closeRedis(){
		redisson.shutdown();
	}
	
	@Test
	public void setString(){
		RBucket<String> rbString = redisson.getBucket("ol_id");
		rbString.set("1234567");
		System.out.println(rbString.get());
	}
}
